/*
 * File: Fu_SensAvrgFast.h
 *
 * Code generated for Simulink model 'Fu_SensAvrgFast'.
 *
 * Model version                  : 1.119
 * Simulink Coder version         : 8.2 (R2012a) 29-Dec-2011
 * TLC version                    : 8.2 (Dec 29 2011)
 * C/C++ source code generated on : Thu Jun 06 00:32:53 2013
 *
 * Target selection: ert.tlc
 * Embedded hardware selection: ARM Compatible->ARM Cortex
 * Code generation objectives: Unspecified
 * Validation result: Not run
 */

#ifndef RTW_HEADER_Fu_SensAvrgFast_h_
#define RTW_HEADER_Fu_SensAvrgFast_h_
#ifndef Fu_SensAvrgFast_COMMON_INCLUDES_
# define Fu_SensAvrgFast_COMMON_INCLUDES_
#include <stddef.h>
#include <string.h>
#include "rtwtypes.h"
#include "rtw_shared_utils.h"
#endif                                 /* Fu_SensAvrgFast_COMMON_INCLUDES_ */

#include "Fu_SensAvrgFast_types.h"

/* Macros for accessing real-time model data structure */
#ifndef rtmGetErrorStatus
# define rtmGetErrorStatus(rtm)        ((rtm)->errorStatus)
#endif

#ifndef rtmSetErrorStatus
# define rtmSetErrorStatus(rtm, val)   ((rtm)->errorStatus = (val))
#endif

/* Block signals (auto storage) */
typedef struct {
  int16_T Subtract1;                   /* '<S5>/Subtract1' */
  int16_T Subtract1_k;                 /* '<S4>/Subtract1' */
} BlockIO_Fu_SensAvrgFast;

/* Block states (auto storage) for system '<Root>' */
typedef struct {
  int32_T LowPass_circBuf;             /* '<S3>/LowPass' */
  int32_T LowPass1_circBuf;            /* '<S3>/LowPass1' */
  int16_T LowPass_states[2];           /* '<S3>/LowPass' */
  int16_T LowPass1_states[2];          /* '<S3>/LowPass1' */
  int16_T Memory_PreviousInput;        /* '<S5>/Memory' */
  int16_T Memory_PreviousInput_d;      /* '<S4>/Memory' */
} D_Work_Fu_SensAvrgFast;

/* Constant parameters (auto storage) */
typedef struct {
  /* Pooled Parameter (Expression: [0.1 0.5 0.4])
   * Referenced by:
   *   '<S3>/LowPass'
   *   '<S3>/LowPass1'
   */
  int16_T pooled8[3];
} ConstParam_Fu_SensAvrgFast;

/* Real-time Model Data Structure */
struct RT_MODEL_Fu_SensAvrgFast {
  const char_T * volatile errorStatus;
};

/* Block signals (auto storage) */
extern BlockIO_Fu_SensAvrgFast Fu_SensAvrgFast_B;

/* Block states (auto storage) */
extern D_Work_Fu_SensAvrgFast Fu_SensAvrgFast_DWork;

/* Constant parameters (auto storage) */
extern const ConstParam_Fu_SensAvrgFast Fu_SensAvrgFast_ConstP;

/*
 * Exported Global Signals
 *
 * Note: Exported global signals are block signals with an exported global
 * storage class designation.  Code generation will declare the memory for
 * these signals and export their symbols.
 *
 */
extern uint16_T Adc_RawCurrU;          /* '<S2>/Divide1' */
extern uint16_T Adc_RawCurrV;          /* '<S2>/Divide2' */
extern int16_T Net_CurrPhasV;          /* '<S3>/Data Type Conversion' */
extern int16_T Net_CurrPhasU;          /* '<S3>/Data Type Conversion1' */
extern int16_T Net_CurrPhasW;          /* '<S3>/Add' */

/* Model entry point functions */
extern void Fu_SensAvrgFast_initialize(void);
extern void Fu_SensAvrgFast_step(void);

/* Real-time Model object */
extern struct RT_MODEL_Fu_SensAvrgFast *const Fu_SensAvrgFast_M;

/*-
 * The generated code includes comments that allow you to trace directly
 * back to the appropriate location in the model.  The basic format
 * is <system>/block_name, where system is the system number (uniquely
 * assigned by Simulink) and block_name is the name of the block.
 *
 * Use the MATLAB hilite_system command to trace the generated code back
 * to the model.  For example,
 *
 * hilite_system('<S3>')    - opens system 3
 * hilite_system('<S3>/Kp') - opens and selects block Kp which resides in S3
 *
 * Here is the system hierarchy for this model
 *
 * '<Root>' : 'Fu_SensAvrgFast'
 * '<S1>'   : 'Fu_SensAvrgFast/Fu_SensAvrgFast'
 * '<S2>'   : 'Fu_SensAvrgFast/Fu_SensAvrgFast/Fu_SensAvrt_Average'
 * '<S3>'   : 'Fu_SensAvrgFast/Fu_SensAvrgFast/Fu_SensAvrt_ConvertToCurr'
 * '<S4>'   : 'Fu_SensAvrgFast/Fu_SensAvrgFast/Fu_SensAvrt_ConvertToCurr/HiPass1'
 * '<S5>'   : 'Fu_SensAvrgFast/Fu_SensAvrgFast/Fu_SensAvrt_ConvertToCurr/HiPass2'
 */
#endif                                 /* RTW_HEADER_Fu_SensAvrgFast_h_ */

/*
 * File trailer for generated code.
 *
 * [EOF]
 */
